package org.example;

import org.example.config.ScheduleTask;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class CustomerController {

    @Resource
    private ScheduleTask scheduleTask;

    @GetMapping("/changeScheduling")
    public String changeScheduling(String cron){
        scheduleTask.setCron(cron);
            return "ok";
    }
}
